﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DAL.Migrations
{
    public partial class _552 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Arrangs",
                columns: table => new
                {
                    ArrangId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    HouseTypeId = table.Column<int>(type: "int", nullable: false),
                    HouseNumId = table.Column<int>(type: "int", nullable: false),
                    ArrangName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ArrangPhone = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    State = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Arrangs", x => x.ArrangId);
                });

            migrationBuilder.CreateTable(
                name: "HouseNums",
                columns: table => new
                {
                    HouseNumId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    HouseNumName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    States = table.Column<bool>(type: "bit", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    HouseTypeId = table.Column<int>(type: "int", nullable: false),
                    HouseState = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HouseNums", x => x.HouseNumId);
                });

            migrationBuilder.CreateTable(
                name: "houseTypes",
                columns: table => new
                {
                    HouseTypeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    HouseTypeName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HouseTypeImg = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HouseTypeArear = table.Column<double>(type: "float", nullable: false),
                    HouseTypeState = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_houseTypes", x => x.HouseTypeId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Arrangs");

            migrationBuilder.DropTable(
                name: "HouseNums");

            migrationBuilder.DropTable(
                name: "houseTypes");
        }
    }
}
